From 8c57be2c2feb5515e8d081673842f76e50395cef Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 4 Jan 2005 03:51:02 +0000 Subject: [PATCH] Remove O_NDELAYs from all opens - it torments the Linux/USB ttys for no good reason and it's not like the code really does the right thing with O_NDELAY anyway... --- gpsbabel/jeeps/gpsserial.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 91451311c..68b97a9da 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -61,6 +61,11 @@ char *rxdata[] = { * internal. This means we ignore that 'fd' number that gets passed in. */ +static HANDLE comport; + +/* + * Display an error from the serial subsystem. + */ void GPS_Serial_Error(char *hdr) { char msg[200]; @@ -76,8 +81,6 @@ void GPS_Serial_Error(char *hdr) GPS_Error(msg); } -static HANDLE comport; - int32 GPS_Serial_On(const char *port, int32 *fd) { DCB tio; @@ -248,7 +251,7 @@ int32 GPS_Serial_Savetty(const char *port) if (gps_is_usb) return 1; - if((fd = open(port, O_RDWR|O_NDELAY))==-1) + if((fd = open(port, O_RDWR))==-1) { perror("open"); gps_errno = SERIAL_ERROR; @@ -264,7 +267,6 @@ int32 GPS_Serial_Savetty(const char *port) return 0; } - if(!GPS_Serial_Close(fd,port)) { gps_errno = SERIAL_ERROR; @@ -291,7 +293,7 @@ int32 GPS_Serial_Restoretty(const char *port) if (gps_is_usb) return 1; - if((fd = open(port, O_RDWR|O_NDELAY))==-1) + if((fd = open(port, O_RDWR))==-1) { perror("open"); gps_errno = HARDWARE_ERROR; @@ -340,7 +342,6 @@ int32 GPS_Serial_Open(int32 *fd, const char *port) return 0; } - if(tcgetattr(*fd,&tty)==-1) { perror("tcgetattr"); -- 2.30.2